/*
 * GMoveMakingMatchResult.java
 * Created on 18 oct. 2008
 *
 * Glacéo Internet Platform
 * http://sourceforge.net/projects/chm/
 *
 * Copyright (c) 2005-2009, Jens and Jan Janke (VirtualHockey Project)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.hockeo.vhbase.seasoncycle.movemaking;

import com.hockeo.vhbase.data.dao.club.GClub;
import com.hockeo.vhbase.data.dao.match.GMatch;

/**
 * This class temporarily holds the goals that have been placed for a particular match
 * for a computer controlled club.
 *
 * @version $Id$
 * @author jjanke
 */
final class GMoveMakingMatchResult
{
  private final int d_nMatchId;
  private int d_nPlacedGoalsHome = -1;
  private int d_nPlacedGoalsAway = -1;

  GMoveMakingMatchResult( final int nMatchId )
  {
    d_nMatchId = nMatchId;
  }

  void placeGoals( GClub club, GMatch match, int nGoals )
  {
    if ( match.getClubHome().equals( club ) )
      d_nPlacedGoalsHome = nGoals;
    else
      d_nPlacedGoalsAway = nGoals;
  }

  final int getMatchId()
  {
    return d_nMatchId;
  }

  final int getPlacedGoalsHome()
  {
    return d_nPlacedGoalsHome;
  }

  final int getPlacedGoalsAway()
  {
    return d_nPlacedGoalsAway;
  }
}
